// StandardSet.h: interface for the StandardSet class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_STANDARDSET_H__58F93329_E9B2_4562_96F3_E6589E9E9B67__INCLUDED_)
#define AFX_STANDARDSET_H__58F93329_E9B2_4562_96F3_E6589E9E9B67__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "StandardInfo.h"

class StandardSet  
{
	friend class CrudeDataDB;
	friend class MangerDB;
public:
	StandardSet();
	virtual ~StandardSet();
	
public:
	void DBPath(const CString& strPath){
		m_strDataPath = strPath;
	}

public:
	StandardInfo* GetFirst();
	StandardInfo* GetNext();

protected:
	virtual StandardInfo* ReadStandardInfo();
	void SetRecordSet(_RecordsetPtr& rs){
		Close();
		m_rs = rs;
	}

	void Close(){
		if(m_rs != NULL && m_rs->GetState() == adStateOpen)
			m_rs->Close();
	}
	
	_RecordsetPtr& GetRecordSet(){
		return m_rs;
	}

protected:
	_RecordsetPtr m_rs;
	CString m_strDataPath;
};

#endif // !defined(AFX_STANDARDSET_H__58F93329_E9B2_4562_96F3_E6589E9E9B67__INCLUDED_)
